package org.ccunix.eshop.service.impl;

import org.ccunix.eshop.dao.MerchandiseDao;
import org.ccunix.eshop.domain.dto.MerchandiseVO;
import org.ccunix.eshop.service.MerchandiseServiceIface;

import java.util.List;

public class MerchandiseServiceImpl implements MerchandiseServiceIface {
    MerchandiseDao merchandiseDao = new MerchandiseDao();
    @Override
    public List<MerchandiseVO> getMerchantListBySpecial(String special,String query) {
        int s = Integer.parseInt(special);
        return merchandiseDao.selectMerchantListBySpecial(s,query);
    }

    @Override
    public MerchandiseVO getMerchantById(String id) {
        int int_id = Integer.parseInt(id);
        return merchandiseDao.selectMerchantById(int_id);
    }
}
